import pytest, time
from selenium.webdriver.common.by import By


class DunningReportLocator:
    # """
    #   admin portal 页面
    #  """
    # admin portal 页面
    admin_portal_page = (By.CSS_SELECTOR, '[id="root"]')
    # 初始页面展开的tab
    default_page_expanded = (By.CSS_SELECTOR, '[aria-expanded="true"]')
    # Dashboards_tab
    Dashboards_tab = (By.XPATH, "//div[contains(@data-menu-id,'DASHBOARD_PLT')]")
    # admin portal 页面左侧栏的Dashboards下的User Status按钮
    Dashboards_UseStatus_title = (By.CSS_SELECTOR,'[path="/console/dashboardReport/activeUserData"]')
    # admin portal的Dashboards下的User Status页面
    Dashboards_UseStatus_page = (By.XPATH, "(//div[@class='cre-page-container-default-content'])")

    # Active页面下载按钮
    UseStatus_Active_download_button = (By.XPATH, "(//span[@aria-label='download'])[1]")
    # Dunning页面下载按钮
    UseStatus_Dunning_download_button = (By.XPATH, "(//span[@aria-label='download'])[2]")

    # Dunning页面标题
    UseStatus_Dunning_title = (By.XPATH, "(//div[@role='tab'])[2]")
    # Dunning页面the data as of数据
    UseStatus_Dunning_the_data = (By.XPATH, "//span[@class='dunning-date___2f79K']")
    # All Dunning按钮
    All_Dunning_title = (By.XPATH, "(//div[@class='card-contend___3R0yS']//span[@class='click-number___3cHwF'])[1]")
    # Dunning1 按钮
    Dunning_one_title = (By.XPATH, "(//div[@class='card-contend___3R0yS']//span[@class='click-number___3cHwF'])[4]")
    # Dunning2 按钮
    Dunning_two_title = (By.XPATH, "(//div[@class='card-contend___3R0yS']//span[@class='click-number___3cHwF'])[3]")
    # Dunning3 按钮
    Dunning_three_title = (By.XPATH, "(//div[@class='card-contend___3R0yS']//span[@class='click-number___3cHwF'])[2]")

    # User Status_dunning页面字段
    # Account Email字段
    Account_email_title = (By.XPATH, "//th[@class='antd4-table-cell'][1]")
    # Dunning Status字段
    Dunning_Status = (By.XPATH, "//th[@class='antd4-table-cell'][2]")
    # Dunning 1 Time字段
    Dunning_1_Time = (By.XPATH, "//th[@class='antd4-table-cell'][3]")
    # Account Type字段
    Account_Type = (By.XPATH, "//th[@class='antd4-table-cell'][4]")
    # User Name字段
    User_Name = (By.XPATH, "//th[@class='antd4-table-cell'][5]")
    # Phone Number字段
    Phone_Number = (By.XPATH, "//th[@class='antd4-table-cell'][6]")
    # Credit Account  (Currency)字段
    Credit_Account = (By.XPATH, "//th[@class='antd4-table-cell'][7]")
    # Cash Account (Currency)字段
    Cash_Account = (By.XPATH, "//th[@class='antd4-table-cell'][8]")
    # Outstanding Amount (Currency)字段
    Outstanding_Amount = (By.XPATH, "//th[@class='antd4-table-cell'][9]")
    # User Group字段
    User_Group = (By.XPATH, "//th[@class='antd4-table-cell'][10]")
    # Organization字段
    Organization = (By.XPATH, "//th[@class='antd4-table-cell'][11]")
    # Creation Time字段
    Creation = (By.XPATH, "//th[@class='antd4-table-cell'][12]")

    # Dunning1 Status字段数据
    Dunning_Status_data1 = (By.XPATH, "//span[@class='dunning-1___1Gg_8']")
    # Dunning2 Status字段数据
    Dunning_Status_data2 = (By.XPATH, "//span[@class='dunning-2___3JQ-S']")
    # Dunning3 Status字段数据
    Dunning_Status_data3 = (By.XPATH, "//span[@class='dunning-3___2035E']")

    # Dunning Status字段下拉框
    Dunning_Status_button = (By.XPATH, "//span[@role='button']")
    # 勾选框
    Dunning_Status_click_button = (By.XPATH, "//input[@class='antd4-checkbox-input']")

    # Dunning 1 Time数据+12
    Dunning_1_Time_Data1 = (By.XPATH, "(//div[@class='cre-table-nowrap'])[3]")
    Dunning_1_Time_Data2 = (By.XPATH, "(//div[@class='cre-table-nowrap'])[15]")
    Dunning_1_Time_Data3 = (By.XPATH, "(//div[@class='cre-table-nowrap'])[27]")
















